package com.panda.cn;

import cn.hutool.cron.CronUtil;
import com.panda.cn.config.property.CustomProperty;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * 运行应用程序
 *
 * @author Yanmh
 * @date 2022/09/13
 */
@Slf4j
@SpringBootApplication
public class RunApplication extends SpringBootServletInitializer {
    // war包配置信息
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(RunApplication.class);
    }
    
    public static void main(String[] args) {
        SpringApplication.run(RunApplication.class, args);
        log.info(">>> 装载成功");
        CronUtil.start();
        log.info(">>> 开启每天凌晨1点开启保留5天日志的定时任务成功");
    }
    
}
